//
//  Acitve.m
//  SDDataTest
//
//  Created by sodao on 12-9-20.
//  Copyright (c) 2012年 sodao. All rights reserved.
//

#import "Active.h"

@implementation Active
@synthesize picURL;
@synthesize name;
@synthesize startDate;
@synthesize endDate;
@synthesize total;
@synthesize activeID;
@synthesize status;
@synthesize EventDetailList;
@synthesize topImageURL;
@synthesize bottomImageURL;
@synthesize isJoin;
@synthesize canJoin;
@synthesize dayMCAdd;
@synthesize daySort;
@synthesize topPicSize;
@synthesize bottomPicSize;
@synthesize sortDayMCAdd;

-(id)init{
    self = [super init];
    if (self) {
        EventDetailList = [[NSMutableArray alloc] init];
        sortDayMCAdd = [[NSMutableDictionary alloc] init];
        status = 0;
    }
    return self;
}
-(id)initWithDictionary:(NSDictionary*)dictionary{
    if (self = [super init]) {
        self.picURL = [dictionary objectForKey:@"Event_Pic"];
        self.startDate = [self getServerUTC:[[dictionary objectForKey:@"BeginTime"] longLongValue]];
        self.endDate = [self getServerUTC:[[dictionary objectForKey:@"EndTime"]longLongValue]];
        self.status = [[dictionary objectForKey:@"Processed"] intValue];
        self.name = [dictionary objectForKey:@"Name"];
        self.activeID = [self getFeedIDByObject:[dictionary objectForKey:@"Event_id"]];
        self.total = [[dictionary objectForKey:@"HaveJoinC"] intValue];
    }
    return self;
}




@end
